package com.maywide.jdp.system.service;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.maywide.jdp.system.entities.Rule;

/**
 * 规则管理Service接口
 * 
 * @author luoyang
 * @version 1.0
 * @since JDK1.6
 */
public interface RuleService extends LockedService {

	/**
	 * 新增规则
	 * 
	 * @param rule
	 *            规则对象
	 * @param request
	 *            HttpServletRequest对象
	 * @return Parameter 新增后的对象
	 */
	public Rule insert(Rule rule, HttpServletRequest request,
			HttpServletResponse response, HttpSession session)
			throws Exception;

	/**
	 * 修改规则
	 * 
	 * @param rule
	 *            规则对象
	 * @param request
	 *            HttpServletRequest对象
	 * @return Rule 修改后的对象
	 */
	public Rule update(Rule rule, HttpServletRequest request,
			HttpServletResponse response, HttpSession session)
			throws Exception;

	/**
	 * 读取规则
	 * 
	 * @param id
	 *            规则ID
	 * @param request
	 *            HttpServletRequest对象
	 * @return Rule 读取的规则对象
	 */
	public Rule load(String id, HttpServletRequest request,
			HttpServletResponse response, HttpSession session)
			throws Exception;

	/**
	 * @param ids
	 *            移动的节点ID列表
	 * @param targetID
	 *            移动到的机模块节点ID
	 */
	public void move(List<String> ids, String targetID,
			HttpServletRequest request,
			HttpServletResponse response, HttpSession session) throws Exception;
}
